"""
接口文档
"""

import utils.enum_utils as enum
from my_typing import *


def get_openapi_tags() -> ListDict:
    """ 获取 OpenAPI 标签描述 """

    openapi_tags: ListDict = [
        {
            "name": value,
            "description": label,
        }
        for value, label in enum.SwaggerTag.value_2_label.items()
    ]
    openapi_tags = sorted(openapi_tags, key=lambda x: x["name"])  # 按 name 排序

    return openapi_tags
